// hyb_yl/pharmacy/pages/wristwatch/wristwatch.js
var app = getApp();
Page({

  /**
   * 页面的初始数据
   */
  data: {

  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    var that = this;
    var j_id = options.j_id;
    that.setData({
      j_id:j_id
    })
    that.getList();
  },
  getList:function(){
    var that = this;
    app.util.request({
      'url':"entry/wxapp/index.watch_data",
      data:{
        j_id:that.data.j_id,
        openid:wx.getStorageSync('openid'),
      },
      success:function(res){
        that.setData({
          list:res.data
        })
      }
    })
  },
  tosport:function(){
    var that = this;
    wx.navigateTo({
      url: '/hyb_yl/pharmacy/pages/steps/steps?j_id='+that.data.j_id,
    })
  },
  tosleep:function(){
    var that = this;
    wx.navigateTo({
      url: '/hyb_yl/pharmacy/pages/sleep/sleep?j_id='+that.data.j_id,
    })
  },
  toheartrate:function(){
    var that = this;
    wx.navigateTo({
      url: '/hyb_yl/pharmacy/pages/heart_rate_cont/heart_rate_cont?j_id='+that.data.j_id,
    })
  },
  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  }
})